import requests


class HttpPack:

    def __init__(self):
        self.session = requests.Session()

    def requests_api(self, url, method, params=None, json=None, data=None, **kwargs):
        res = self.session.request(method, url, params=params, json=json, data=data, **kwargs)
        try:
            return res.json()
        except ValueError:
            print("No json")
